import { observer } from 'mobx-react'
import PostPage from 'Pages/PostPage'
import React from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import useStores from 'Stores'
import Home from '../Pages/Home'
// import Login from '../Pages/Login'

const Routes = () => {
  const { root } = useStores()

  root.init()

  return (
    <Switch>
      <Route exact path="/" component={Home}></Route>
      {/* <Route exact path="/home/post_page" component={PostPage} /> */}
      <Route path="/home" component={Home}></Route>
      {/* <Redirect to="/" /> */}
    </Switch>
  )
}

export default observer(Routes)
